<form id="MerchantVerificationFrom" action="{:sysuri()}" method="post" data-auto="true" class="layui-form layui-card" data-table-id="MerchantVerificationFrom">
    <div class="layui-card-body">
        <div class="layui-form-item">
            <label class="layui-form-label">用户昵称</label>
            <div class="layui-input-block">
                <input name="$vo.nickname" value='{$vo.merchant.nickname|default=""}' placeholder="" class="layui-input">
                <p class="help-block"></p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">公司名称</label>
            <div class="layui-input-block">
                <input name="company" value='{$vo.company|default=""}' required placeholder="请输入公司名称" class="layui-input">
                <p class="help-block"></p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">纳税人识别号</label>
            <div class="layui-input-block">
                <input name="id_company" value='{$vo.id_company|default=""}' required placeholder="请输入纳税人识别号" class="layui-input">
                <p class="help-block">统一社会信用代码</p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-block">
                <input name="phone" value='{$vo.phone|default=""}' placeholder="请输入联系电话" class="layui-input">
                <p class="help-block"></p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">企业法人</label>
            <div class="layui-input-block">
                <input name="legal_person" value='{$vo.legal_person|default=""}' placeholder="请输入企业法人" class="layui-input">
                <p class="help-block"></p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">企业法人联系电话</label>
            <div class="layui-input-block">
                <input name="legal_person_phone" value='{$vo.legal_person_phone|default=""}'  placeholder="请输入企业法人手机号" class="layui-input">
                <p class="help-block"></p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">营业执照</label>
            <div class="layui-input-block">
<!--                <input  type="hidden" name="license_img" value="{$vo.license_img|default=''}">-->
<!--                <script>$('[name=license_img]').uploadOneImage();</script>-->
                <img style="width: 76px; height: 76px" data-tips-image  src="{$vo.license_img|default=''}" alt="" />
                <p class="help-block"></p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">授权书</label>
            <div class="layui-input-block">
                <!--                <input  type="hidden" name="license_img2" value="{$vo.license_img2|default=''}">-->
                <!--                <script>$('[name=license_img2]').uploadOneImage();</script>-->
                <img style="width: 76px; height: 76px" data-tips-image  src="{$vo.license_img2|default=''}" alt="" />
                <p class="help-block"></p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label label-required">审核结果</label>
            <div class="layui-input-block">
                <div class="layui-input border-0" >
                    <input type="radio" name="status" value="1" title="通过" checked>
                    <input type="radio" name="status" value="-1" title="不通过" >
                </div>
                <p class="help-block"></p>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">审核意见</label>
            <div class="layui-input-block">
                <textarea name="review_reason" placeholder="请输入审核意见" class="layui-textarea">{$vo.review_reason|default=""}</textarea>
                <p class="help-block"></p>
            </div>
        </div>
    </div>

    <div class="hr-line-dashed"></div>
    {notempty name='vo.id'}<input type='hidden' value='{$vo.id}' name='id'>{/notempty}

    <div class="layui-form-item text-center">
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>
</form>

<script>
    // 时间选择器
    layui.use('form', function(){
        var form = layui.form;
        // 选择表单元素
        var formElement = document.getElementById('MerchantVerificationFrom');
        var formElements = formElement.querySelectorAll('input, select, textarea');
        // 排除指定元素
        formElements = Array.from(formElements).filter(el => !['id', 'status', 'review_reason'].includes(el.getAttribute('name')));
        // 遍历这些元素并禁用它们
        formElements.forEach(function(el) {
            el.disabled = true;
            el.classList.add('layui-disabled');
        });
        // 如果需要动态更新Layui样式，可以重新渲染表单
        form.render();
    });
</script>